
package todolist.logic.parser;

import todolist.entity.SortDirectionType;
import todolist.entity.TaskFieldType;

/**
 * Parsed Sort description, along with error message if any.
 * @author Ivan
 */
public class SortParseResult {

	private TaskFieldType _enmField;
	private SortDirectionType _enmSortDir;
	private String _strError;
	
	/**
	 * Both DT, as well as Error message, initialized to null.
	 */
	public SortParseResult() {
		_enmField = null;
		_enmSortDir = null;
		_strError = null;
	}
	
	// getters
	
	public TaskFieldType getTaskField() {
		return _enmField;
	}
	
	public SortDirectionType getSortDirection() {
		return _enmSortDir;
	}

	/**
	 * Error message if present, or else null.
	 */
	public String getError() {
		return _strError;
	}
	
	// setters
	
	public void setTaskField(TaskFieldType penmField) {
		_enmField = penmField;
	}
	
	public void setSortDirection(SortDirectionType penmSortDir) {
		_enmSortDir = penmSortDir;
	}
	
	/**
	 * Error message if present, or else null.
	 */
	public void setError(String pstrError) {
		_strError = pstrError;
	}
	
}
